<?php

/**
 * Реализация клиента для биржи ссылок Sape на основе W3xmlrpcClient
 *
 * @author Evgeny Blinov <e.a.blinov@gmail.com>
 * @license New BSD License
 * @link http://code.google.com/p/w3lib/
 * @package W3xmlrpcClient
 * @version $Id: W3SapeClient.php 4 2011-10-17 23:48:11Z E.A.Blinov@gmail.com $
 */

class W3SapeClient extends W3xmlrpcClient {
    const ADDRESS = 'http://api.sape.ru/xmlrpc/?v=extended';

    public function __construct($login, $password, $isMd5 = false, _W3xmlrpcAdapter $Adapter = null) {
        if ($Adapter === null)
            $Adapter = new W3xmlrpcAdapterCURL;

        parent::__construct(self::ADDRESS, 'sape.', $Adapter);
        $Adapter->repeatRequest = 10;
        $Adapter->repeatPossible[403] = 403;
        $this->login($login, $password, $isMd5);
    }

    public function placements_wait_delete_url_array(array $ids){
        $result = array();
        foreach ($ids AS $id) $result[$id] = $this->placements_wait_delete_url($id);
        return $result;
    }

}